﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;

namespace ServicioWindowsAprobacionGastos
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            //JavaScriptSerializer js = new JavaScriptSerializer();
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://localhost:3181/Gastos.svc/SincronizarGastos");
            req.Method = "GET";
            HttpWebResponse res = (HttpWebResponse)req.GetResponse();
            StreamReader reader = new StreamReader(res.GetResponseStream());
            //string alumnoJson = reader.ReadToEnd();
            //GastoModel alumno = js.Deserialize<GastoModel>(alumnoJson);
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
    public class GastoModel
    {
        public string codigo { get; set; }
        public string nombre { get; set; }
        public double monto { get; set; }
        public string estado { get; set; }

    }
}
